{% extends 'management.html' %}
{% load i18n %}
	
{% block content %}
  <script type="text/javascript" src="/res/js/tiny_mce/tiny_mce.js"></script>
  <script type="text/javascript">
		initTiny();
  </script>
  
  <div id="detail">
		<form action='/admin/editfile/' method='post' name='addFile'>
			<input name="id" type="hidden" value="{{file.key.id}}"/>
			<p>{% trans "File Name" %}:
				<input name="filename" type='text' size="50" value="{{file.name}}" />
			</p>
			<p>{% trans "Public" %}:
						{% if file.isPublic %}
							<input name='isPublic' type='checkbox' value="True" checked="checked"/>
						{% else %}
							<input name='isPublic' type='checkbox' value="True"/>
						{% endif %}
			</p>
			<p>{% trans "Category" %}:
							<select name="category" >
							{% for category in categories%}
								{% ifequal category.name file.jumCategory.name %}
									<option selected="selected">{{category.name}}</option>
								{% else %}
									<option>{{category.name}}</option>
								{% endifequal %}
								
							{% endfor %}
							</select>
			</p>
			<p>{% trans "Describe" %}:</p>
			<p>
							<textarea id="describe" name="describe" class="mceEditor" rows="20" cols="45" style="width: 70%">
							{{file.describe}}
							</textarea>
			</p>
			<p class="subbutton">
									<input type='submit' value='{% trans "OK" %}' />
									<input type='reset' value='{% trans "Cancel" %}' /> 
			</p>
		</form>
	</div>
{% endblock content %}